package com.luoye.audiodemo.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.luoye.audiodemo.demo.bitmap.YBitmapOrthogonalSurface
import com.luoye.audiodemo.demo.bitmap.YBitmapSurfaceView
import com.luoye.audiodemo.demo.bitmap.YWaterMarkSurface
import com.luoye.audiodemo.demo.camera.api1.YCamera1View
import com.luoye.audiodemo.demo.camera.api2.YCamera2View
import com.luoye.audiodemo.demo.fbo.YFboSurfaceView
import com.luoye.audiodemo.weight.MyGLBitmapView
import com.luoye.audiodemo.weight.MyGLBitmapView2
import com.luoye.audiodemo.weight.MyGLSurfaceView
import com.luoye.audiodemo.weight.MyGLSurfaceView1
import com.luoye.audiodemo.weight.MyGLSurfaceView2
import com.luoye.audiodemo.weight.MyGLSurfaceView3
import com.luoye.audiodemo.weight.MyGLSurfaceView4
import com.luoye.audiodemo.weight.MyGLView
import com.luoye.audiodemo.weight.MyGLView1
import com.luoye.audiodemo.weight.MyGLView2

class MyGLViewFragment : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLView(requireContext())
    }
}

class MyGLViewFragment1 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLView1(requireContext())
    }
}

class MyGLViewFragment2 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLSurfaceView(requireContext())
    }
}

/**
 * 绘制3角形，等形状。
 */
class MyGLViewFragment3 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLSurfaceView1(requireContext())
    }
}
class MyGLViewFragment4 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLSurfaceView2(requireContext())
    }
}
class MyGLViewFragment5 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLSurfaceView3(requireContext())
    }
}

class MyGLViewFragment6 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLSurfaceView4(requireContext())
    }
}

/**
 * 通过
 */
class MyGLViewFragment7 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLView2(requireContext())
    }
}

class MyGLViewFragment8 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLBitmapView(requireContext())
    }
}
class MyGLViewFragment9 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return YCamera1View(requireContext())
    }
}
class MyGLViewFragment10 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return YCamera2View(requireContext())
    }
}
class MyGLViewFragment11 : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        return MyGLBitmapView2(requireContext())
    }
}